package com.extension.company.view.my.localorder.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.extension.company.admin.R;
import com.extension.company.model.entity.SameCityOrderAllBean;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;


/**
 * 同城---未发货
 */
public class LocalCityOrderUntranslateAdapter extends RecyclerView.Adapter<LocalCityOrderUntranslateAdapter.ViewHolder> {


	private List<SameCityOrderAllBean> mValues;
	private OnListFragmentInteractionListener mListener;

	private Context context;

	public LocalCityOrderUntranslateAdapter(Context context, List<SameCityOrderAllBean> list) {
		this.context = context;
		this.mValues = list;
	}

	@Override
	public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
		View view = LayoutInflater.from(parent.getContext())
				.inflate(R.layout.fragment_fragmentuntranslate, parent, false);
		return new ViewHolder(view);
	}

	@Override
	public void onBindViewHolder(final ViewHolder holder, int position) {


		holder.unTranslateItemLeft.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				if (null != mListener) {
					//	mListener
				}
			}
		});
	}

	@Override
	public int getItemCount() {
		return 10;
	}

	public class ViewHolder extends RecyclerView.ViewHolder {

		@BindView(R.id.un_translate_item_icon)
		ImageView unTranslateItemIcon;
		@BindView(R.id.un_translate_store_name)
		TextView unTranslateStoreName;
		@BindView(R.id.un_translate_img)
		ImageView unTranslateImg;
		@BindView(R.id.un_translate_productor_title)
		TextView unTranslateProductorTitle;
		@BindView(R.id.un_translate_total_number)
		TextView unTranslateTotalNumber;
		@BindView(R.id.un_translate_total_price)
		TextView unTranslateTotalPrice;
		@BindView(R.id.un_translate_item_left)
		Button unTranslateItemLeft;
		@BindView(R.id.un_translate_item_right)
		Button unTranslateItemRight;

		public ViewHolder(View view) {
			super(view);
			ButterKnife.bind(this, view);

		}
	}


	public interface OnListFragmentInteractionListener {

	}

	public void setOnItemLick(OnListFragmentInteractionListener onItemLick) {
		this.mListener = onItemLick;
	}
}
